package mypackage;

import org.apache.commons.lang3.time.DateFormatUtils;
import org.springframework.data.redis.core.RedisTemplate;

import java.util.Date;

public class RedisTest {

    public static final String TARGET_ALLOCATION_KEY = "target_allocation:%s:%d";

    public static void main(String[] args) {

        String date = DateFormatUtils.format(new Date(), "yyyy-MM-dd");
        Integer operationGroupId = 2;

        String format = String.format(TARGET_ALLOCATION_KEY, date, operationGroupId);
        System.out.println(format);

        RedisTemplate<String, String> redisTemplate = new RedisTemplate<>();
        redisTemplate.opsForValue().set("aaa", "111");
        //
        //String value = redisTemplate.opsForValue().get("aaa");
        //System.out.println(value);
    }
}
